package com.ljkj.cordial.lengthtcpheartbeat;

import com.lanjiu.pro.business.BusinessProtocolMessageStandard;

import io.netty.channel.Channel;
import io.netty.channel.ChannelHandlerContext;

public interface IEventMessageListener {
    /**
     * 心跳消息
     *
     * @return
     */
//    BusinessProtocolMessageStandard.CheckUnifiedEntranceMessage getHeartbeatMsg();

    /**
     * 断开心跳消息
     *
     * @return
     */
//    BusinessProtocolMessageStandard.CheckUnifiedEntranceMessage getDisconHeartbeatMsg();

    BusinessProtocolMessageStandard.CheckUnifiedEntranceMessage getEmptyMsg(String msgType);

    /**
     * 握手消息
     *
     * @return
     */
    BusinessProtocolMessageStandard.CheckUnifiedEntranceMessage getHandshakeMsg();

    /**
     * 发送消息类型
     *
     * @return
     */
    String getServerSendReportMsgType();

    /**
     * 接收消息类型
     *
     * @return
     */
    String getClientReceivedReportMsgType();

    /**
     * @return 成功写入累计中
     */
    boolean isSuccessWriting();

    /**
     * 成功写入次数
     *
     * @return
     */
    int writSuccessedTimes();


    /**
     * @return 写入失败累计中
     */
    boolean isFailingWriting();

    /**
     * 写入失败次数
     *
     * @return
     */
    int writFailedTimes();

    long getHeartbeatSpaceTime();

    long getOutTimeHeartbeatTime();

    ChannelHandlerContext getChannelCxt();

    boolean isReConnecting();


    void receiveMsg(BusinessProtocolMessageStandard.CheckUnifiedEntranceMessage msg);

    void send(BusinessProtocolMessageStandard.CheckUnifiedEntranceMessage msg);

    void receiveError();

    String getServerSendReportCheckSum();

    String getClientReceivedReportCheckSum();

    String getUserId();

    boolean isForceExit();
    void setOverTimeLli(Channel channel);
}
